map

abstract fun <R> map(transform: (T) -> R): Try<R>

Maps value of a Success using transform or returns the same Try if this is a Failure.

Return

Try with a value mapped using transform or this object if this is a Failure.

Parameters

transform

Function transforming value of a Success.